for i in `seq 1 200`;do
cp /etc/libvirt/qemu/template.xml /etc/libvirt/qemu/linux1$i.xml
echo "cp linux1$i.xml"
mac1=`openssl rand -base64 8 | md5sum |  cut -c1-2`
mac2=`openssl rand -base64 8 | md5sum |  cut -c1-2`
sed -i "2c <name>linux1$i</name>" /etc/libvirt/qemu/linux1$i.xml
sed -i "29c <source protocol='sheepdog' name='linux1$i'>" /etc/libvirt/qemu/linux1$i.xml
sed -i "36c <source protocol='sheepdog' name='disk10$i'>" /etc/libvirt/qemu/linux1$i.xml
sed -i "61c  <mac address='52:54:00:b1:$mac1:$mac2'/>" /etc/libvirt/qemu/linux1$i.xml
if [ $i -lt 11 ]
then
dog vdi clone -s 1 s_centos72_v1 linux1$i
dog vdi create disk10$i 50G
else
dog vdi clone -s 1 s_centos72_v2 linux1$i
dog vdi create disk10$i 40G
fi
virsh define /etc/libvirt/qemu/linux1$i.xml
virsh start linux1$i 
done
